using UnityEngine;
using Voodoo.Distribution;

[CreateAssetMenu(menuName = "Shop/SkinMission", fileName = "SkinMission")]
public class SkinMission : ScriptableObject
{
	public string ID;

	public SkinMissionType MissionType;

	public string Description;

	public int Goal;

	public Item LinkedSkin;

	public int Progress
	{
		get
		{
			return NintendoPlayerPrefs.GetInt(ID + "_Progress", 0);
		}
		set
		{
			NintendoPlayerPrefs.SetInt(ID + "_Progress", value);
		}
	}

	public string GetStatus()
	{
		int num = Mathf.Clamp(Progress, 0, Goal);
		if (MissionType == SkinMissionType.Money)
		{
			return string.Format(Localization.GetTranslation("Mission_MakeMoney"), TextExtension.TextNumber(num), TextExtension.TextNumber(Goal));
		}
		if (MissionType == SkinMissionType.Days)
		{
			return string.Format(Localization.GetTranslation("Mission_PlayDays"), num, Goal);
		}
		if (MissionType == SkinMissionType.UpgradeLength)
		{
			return string.Format(Localization.GetTranslation("Mission_UpgradeLength"), num, Goal);
		}
		return string.Format(Localization.GetTranslation("Mission_LevelComplete"), num, Goal);
	}
}
